package com.gdcnano.libs.xspf4x
{
    /**
     * Class for XSPF Track element 
     * @author gareevm
     * 
     */    
    
    public class XSPFTrack
    {
        
        private var _album:String;
        
        private var _annotation:String;
        
        private var _creator:String;
        
        private var _duration:uint;
        
        private var _identifier:String;
        
        private var _image:String;
        
        private var _info:String;
        
        private var _location:String;
        
        private var _title:String;
        
        private var _trackNum:uint;
        
        
        //TODO: defines which type will fit this properties better
        
        //private var _link:
        
        //private var _meta:
        
        //private var _extension:
        
        public function XSPFTrack(xspfXMLTrackInfo:XML)
        {
            _location = xspfXMLTrackInfo._xspfns::location.toString();
            
            _identifier = xspfXMLTrackInfo._xspfns::identifier.toString();
            
            _title = xspfXMLTrackInfo._xspfns::title.toString();
            
            _creator = xspfXMLTrackInfo._xspfns::creator.toString();
            
            _annotation = xspfXMLTrackInfo._xspfns::annotation.toString();
            
            _info = xspfXMLTrackInfo._xspfns::info.toString();
            
            _image = xspfXMLTrackInfo._xspfns::image.toString();
            
            _album = xspfXMLTrackInfo._xspfns::album.toString();
            
            _trackNum = uint(xspfXMLTrackInfo._xspfns::trackNum.toString());
            
            _duration = uint(xspfXMLTrackInfo._xspfns::duration.toString());
        }
        
        
        public function get album():String
        {
            return _album;
        }
        
        
        public function get annotation():String
        {
            return _annotation;
        }
        
        
        public function get creator():String
        {
            return _creator;
        }
        
        
        public function get duration():uint
        {
            return _duration;
        }
        
        
        public function get identifier():String
        {
            return _identifier;
        }
        
        
        public function get image():String
        {
            return _image;
        }
        
        
        public function get info():String
        {
            return _info;
        }
        
        
        public function get location():String
        {
            return _location;
        }
        
        
        public function get title():String
        {
            return _title;
        }
        
        
        public function get trackNum():uint
        {
            return _trackNum;
        }
        
        
        private function get _xspfns():Namespace
        {
            return XSPF4X.xspfNamespace;
        }
    }
}